/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #7f7fd5, #86a8e7, #91eae4);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

body.loaded {
    opacity: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-in-out;
}

body.loaded .container {
    opacity: 1;
    transform: translateY(0);
}

/* 注册容器 */
.register-container {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    min-height: 600px;
    position: relative;
}

/* 左侧面板 */
.left-panel {
    background: linear-gradient(135deg, #3a6186, #89253e);
    color: #ffffff;
    padding: 50px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.8s ease-in-out;
}

body.loaded .left-panel {
    transform: translateX(0);
    opacity: 1;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://img.freepik.com/free-vector/abstract-wave-pattern-background_53876-115845.jpg');
    background-size: cover;
    opacity: 0.1;
    z-index: 0;
    animation: waveAnimation 15s linear infinite;
}

@keyframes waveAnimation {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

.logo {
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-in-out 0.2s;
}

body.loaded .logo {
    transform: translateY(0);
    opacity: 1;
}

.logo h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #fff;
    transition: width 0.5s ease-in-out;
}

.logo:hover h1::after {
    width: 100%;
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
}

.features {
    position: relative;
    z-index: 1;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

body.loaded .feature {
    transform: translateX(0);
    opacity: 1;
}

body.loaded .feature:nth-child(1) {
    transition-delay: 0.4s;
}

body.loaded .feature:nth-child(2) {
    transition-delay: 0.6s;
}

body.loaded .feature:nth-child(3) {
    transition-delay: 0.8s;
}

.feature i {
    font-size: 24px;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.feature:hover i {
    transform: scale(1.2);
}

.feature span {
    font-size: 16px;
}

/* 右侧面板 */
.right-panel {
    flex: 1.2;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.8s ease-in-out;
}

body.loaded .right-panel {
    transform: translateX(0);
    opacity: 1;
}

.form-header {
    margin-bottom: 40px;
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-in-out 0.3s;
}

body.loaded .form-header {
    transform: translateY(0);
    opacity: 1;
}

.form-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 16px;
}

.register-form {
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 40px;
    height: 48px;
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s;
    font-size: 18px;
    line-height: 1;
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 15px 0 45px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f8f8f8;
    line-height: 48px;
}

.form-group input:focus {
    border-color: #86a8e7;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(134, 168, 231, 0.2);
}

.form-group input.error {
    border-color: #ff6b6b;
    background-color: #fff0f0;
}

.form-group.error label,
.form-group input.error ~ label {
    color: #ff6b6b;
}

.error-message {
    position: absolute;
    left: 45px;
    top: 100%;
    margin-top: 2px;
    color: #ff6b6b;
    font-size: 12px;
    display: block;
    padding-left: 0;
    text-align: left;
    animation: fadeIn 0.3s ease-in-out;
    z-index: 3;
    line-height: 1.5;
    white-space: nowrap;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.register-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #3a6186, #89253e);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease-in-out 0.8s;
}

body.loaded .register-btn {
    transform: translateY(0);
    opacity: 1;
}

.register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

.register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.register-btn:hover::before {
    left: 100%;
}

.register-btn.clicked {
    transform: scale(0.95);
    box-shadow: none;
}

.social-login {
    margin-top: 30px;
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease-in-out 0.9s;
}

body.loaded .social-login {
    transform: translateY(0);
    opacity: 1;
}

.social-login p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background-color: #ddd;
    transition: width 0.3s ease;
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-login:hover p::before,
.social-login:hover p::after {
    width: 30%;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f8f8;
    color: #333;
    transition: all 0.3s;
    text-decoration: none;
    transform: scale(0);
    opacity: 0;
}

body.loaded .social-icon {
    transform: scale(1);
    opacity: 1;
}

body.loaded .social-icon:nth-child(1) {
    transition-delay: 1s;
}

body.loaded .social-icon:nth-child(2) {
    transition-delay: 1.1s;
}

body.loaded .social-icon:nth-child(3) {
    transition-delay: 1.2s;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.social-icon i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.social-icon:hover i {
    transform: scale(1.2);
}

.login-link {
    margin-top: 25px;
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease-in-out 1.3s;
}

body.loaded .login-link {
    transform: translateY(0);
    opacity: 1;
}

.login-link p {
    color: #666;
    font-size: 14px;
}

.login-link a {
    color: #3a6186;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.login-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3a6186;
    transition: width 0.3s ease;
}

.login-link a:hover::after {
    width: 100%;
}

.success-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 30px;
    background-color: rgba(46, 213, 115, 0.1);
    color: #2ed573;
    text-align: center;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

.success-message i {
    margin-right: 10px;
    font-size: 18px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .register-container {
        flex-direction: column;
    }
    
    .left-panel {
        padding: 30px 20px;
    }
    
    .right-panel {
        padding: 30px 20px;
    }
    
    .form-header {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .social-login p::before,
    .social-login p::after {
        width: 20%;
    }
}

/* 输入框有值时的样式 */
.form-group input.has-value {
    border-color: #86a8e7;
    background-color: #fff;
}

/* 按钮波纹效果 */
.register-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 提交中状态 */
.register-btn.submitting {
    background: linear-gradient(135deg, #3a6186, #89253e);
    cursor: not-allowed;
    opacity: 0.8;
}

.register-btn.submitting i {
    margin-right: 8px;
}

/* 视差效果 */
.left-panel, .right-panel {
    transition: transform 0.1s ease-out;
}

/* 输入框标签动画 */
.form-group label {
    transition: all 0.3s ease;
}

/* 社交图标悬停效果增强 */
.social-icon {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 表单组动画增强 */
.form-group {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-group:hover {
    transform: translateX(5px);
}

/* 成功消息动画增强 */
.success-message {
    animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 错误消息动画增强 */
.error-message {
    animation: shake 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 页面加载动画增强 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.loaded .container {
    animation: fadeInUp 0.8s ease-out;
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    .form-group:hover {
        transform: none;
    }
    
    .left-panel, .right-panel {
        transform: none !important;
    }
}

/* 表单组抖动动画 */
.form-group.shake {
    animation: shake 0.4s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
} 